let arr1 =['中国大陆','欢迎来淘宝','手机逛淘宝','网页无障碍'];
ul.innerHTML= arr1.map(function(item){
return `
<li> ${item} </li>
`
}).join("")

let arr2 =['淘宝网首页','我的淘宝','购物车','收藏夹','商品分类','免费开店','千牛卖家中心','联系客服'];
ul2.innerHTML= arr2.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

let arr4 =['零食/坚果/特产：','鸭肉类零食','膨化食品','豆腐干','素肉','夹心饼干','糖果','猪肉类'];
ul4.innerHTML= arr4.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

let arr5 =['品牌：','BE& CHEERY/百草味','Three Squirrels/三只松鼠','良品铺子','食为先','其妙',
'欧贝拉','卫龙','渔米之湘','绝艺','Lay’s/乐事','金磨坊',];
ul5.innerHTML= arr5.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

let arr6 =['省份：','湖南省','福建省','河南省','江苏省','浙江省','安徽省','广东省'];
ul6.innerHTML= arr6.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

let arr7 =['肉类产品：','鸭脖','鸭翅','猪肉铺','鸭掌','鸭爪','全鸭','猪肉肠'];
ul7.innerHTML= arr7.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

let arr8 =['筛选条件：','糕点种类','糖种类','口味','巧克力类','相关分类'];
ul8.innerHTML= arr8.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")

var  flag  =  true
btn1.onclick=function(){
    if(flag){
        main_b.style.display="block"
        this.innerText="收起筛选"
        flag=false
    }else{
        main_b.style.display="none"
      this.innerText="显示筛选"
      flag=true
    }
  }

let arr9 =['您是不是想找：','面包','辣条','薯片','饼干','锅巴','泡面','牛肉干'
,'良品铺子','三只松鼠','干脆面','巧克力','水果','饮料'];
ul9.innerHTML= arr9.map(function(item){
return `
<li> ${item} </li>  
`
}).join("")


let arr11=[{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i2/113703595/O1CN01Vz8tUy1cQYSOTAsjB_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp",
    p1:" 15.80",
    p2:" 包邮",
    p3:" 100",
    p4:" 靖港古镇毛毛鱼400g无头麻辣小鱼仔整袋约50包学生零食湖南特产",
    p5:" im19850824",
    p6:" 湖南长沙"
},
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i2/113703595/O1CN013TMHDl1cQYXGykThI_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp",
    p1:"19.90 ",
    p2:"包邮 ",
    p3:"53",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
       
},
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/imgextra/i1/127675538/O1CN01mGtYGX1qmS6BzW0qR_!!0-saturn_solar.jpg_360x360Q90.jpg_.webp",
    p1:"28.80 ",
    p2:"包邮 ",
    p3:"100",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
},
{
    img:"https://picasso.alicdn.com/imgextra/a2471a/O1CNA1Pimgrendera2471aO1CN01TXygsv1NSe8vYAkOM_!!0-item_pic.jpg?backup_url=O1CN01TXygsv1NSe8vYAkOM_!!0-item_pic.jpg&p_context=eyJiaXoiOiJzZWFyY2hTdWJzaWR5IiwiYnVja2V0SWQiOiJCIiwiY2hhbm5lbCI6IndzZWFyY2hpY29uLWl0ZW0iLCJpdGVtSWQiOiI1OTg5NTIzNTcxNzUiLCJwaWNUeXBlIjoicDExIiwicmVuZGVyQ29uZGl0aW9uIjp7fSwicmVuZGVyRGF0YSI6eyJzdWJtYWpvcm9iamVjdCI6Imh0dHBzOi8vZ3cuYWxpY2RuLmNvbS9pbWdleHRyYS9PMUNOMDFUWHlnc3YxTlNlOHZZQWtPTV8hITAtaXRlbV9waWMuanBnIn19&sign=a2471a02117e272c98a32b68b9d747a4&v=10.0_360x360Q90.jpg_.webp",
    p1:"11.80 ",
    p2:"包邮 ",
    p3:"7050",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/i1/748771569/O1CN01frS1Fd1NSe90Lj8nn_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"14.90 ",
    p2:"包邮 ",
    p3:"1500",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search2.alicdn.com/img/bao/uploaded/i4/i4/2549841410/O1CN01DuWaJ21MHpBycDJGR_!!2549841410-0-sm.jpg_360x360Q90.jpg_.webp",
    p1:"62.00 ",
    p2:"包邮 ",
    p3:"7000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i4/877104952/O1CN01xnxFV71mS43iBtFEC_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"59.90 ",
    p2:"包邮 ",
    p3:"2700",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i1/2200805933721/O1CN01KaLIdU1dMGV5BN2cy_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"99.80 ",
    p2:"包邮 ",
    p3:"4万",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://picasso.alicdn.com/imgextra/O1CNA1TV0M5k1zYYgBxhLAa_!!814886726-0-psf.jpg",
    p1:"148.00 ",
    p2:"包邮 ",
    p3:"4000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i2/2549841410/O1CN01UP7nid1MHpCGgJe0x_!!2549841410-0-sm.jpg_360x360Q90.jpg_.webp",
    p1:"149.00 ",
    p2:"包邮 ",
    p3:"5000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i4/628189716/O1CN01pjHauD2Ldyuye5a7m_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"139.00 ",
    p2:"包邮 ",
    p3:"3500",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/i2/2422424737/O1CN01xMsFuv1krasZwJXlL_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"13.30 ",
    p2:"包邮 ",
    p3:"2000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i4/392147177/O1CN01CpYDcw22t7J2aA6Go_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"76.50 ",
    p2:"包邮 ",
    p3:"200",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search2.alicdn.com/img/bao/uploaded/i4/i1/4070486739/O1CN01dcBdde1zeViTHg5MR_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"17.80 ",
    p2:"包邮 ",
    p3:"3000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/i1/2455221099/O1CN01eDBNDd1JzO0P8JHnT_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"69.00 ",
    p2:"包邮 ",
    p3:"1000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i2/2873875872/O1CN01LGcefC1tFQRJZXOyt_!!2873875872.jpg_360x360Q90.jpg_.webp",
    p1:"39.90 ",
    p2:"包邮 ",
    p3:"10000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search1.alicdn.com/img/bao/uploaded/i4/i3/2208170228854/O1CN01lpMDxo2FHBVc5zXBl_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"49.90 ",
    p2:"包邮 ",
    p3:"20000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search2.alicdn.com/img/bao/uploaded/i4/i4/2200778421287/O1CN01MY28Fg1LNUSo9GlMK_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"34.90 ",
    p2:"包邮 ",
    p3:"3000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://g-search3.alicdn.com/img/bao/uploaded/i4/i2/2455221099/O1CN01nFYf5e1JzO14aRL5h_!!0-item_pic.jpg_360x360Q90.jpg_.webp",
    p1:"59.00 ",
    p2:"包邮 ",
    p3:"50000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}
,
{
    img:"https://picasso.alicdn.com/imgextra/6bf343/O1CNA1Pimgrender6bf343O1CN01ogVqTe1LNUTSD1X79_!!0-item_pic.jpg?backup_url=O1CN01ogVqTe1LNUTSD1X79_!!0-item_pic.jpg&p_context=eyJiaXoiOiJzZWFyY2hTdWJzaWR5IiwiYnVja2V0SWQiOiJCIiwiY2hhbm5lbCI6IndzZWFyY2hpY29uLWl0ZW0iLCJpdGVtSWQiOiI1OTg4OTA2ODU2MDQiLCJwaWNUeXBlIjoicDExIiwicmVuZGVyQ29uZGl0aW9uIjp7fSwicmVuZGVyRGF0YSI6eyJzdWJtYWpvcm9iamVjdCI6Imh0dHBzOi8vZ3cuYWxpY2RuLmNvbS9pbWdleHRyYS9PMUNOMDFvZ1ZxVGUxTE5VVFNEMVg3OV8hITAtaXRlbV9waWMuanBnIn19&sign=6bf3434b474c56c7a4b77f22b247ad63&v=10.0_360x360Q90.jpg_.webp",
    p1:"29.90 ",
    p2:"包邮 ",
    p3:"30000",
    p4:"邬辣妈酒鬼鱼孜然鱼仔无头小鱼仔香辣味毛毛鱼仔校园休闲鱼零食 ",
    p5:"im19850824 ",
    p6:"湖南长沙 "
}

]
// function fn(arr11) {
//     main_img.innerHTML= arr11.map(item =>
//         `
//         <dl id="dl">
//             <dt id="dt"><img src=${item.img}></dt>
//             <dd>
//                 <p class="p1"><span>￥</span>${item.p1}</p>
//                 <p class="p2">${item.p2}</p>
//                 <p class="p3">${item.p3}<span>+人付款</span></p>
//                 <p class="p4">${item.p4}</p>
//                 <p class="p5">${item.p5}</p>
//                 <p class="p6">${item.p6}</p>
//             </dd>
//         </dl>
//         `
//         ).join("")

// }
// fn(win)
    main_img.innerHTML= arr11.map(item =>
        `
        <dl id="dl">
            <dt id="dt"><img src=${item.img}></dt>
            <dd>
                <p class="p1"><span>￥</span>${item.p1}</p>
                <p class="p2">${item.p2}</p>
                <p class="p3">${item.p3}<span>+人付款</span></p>
                <p class="p4">${item.p4}</p>
                <p class="p5">${item.p5}</p>
                <p class="p6">${item.p6}</p>
            </dd>
        </dl>
        `
        ).join("")

    let list= [...document.querySelectorAll('#main_b ul li')]
    list.forEach(item => {
        item.onmousemove = function () {
            this.style.color='red';
        }
        item.onmouseout = function () {
            this.style.color='black';
        }
    });

    let pp= [...document.querySelectorAll('.p4')]
    pp.forEach(item => {
        item.onmousemove = function () {
            this.style.color='red';
        }
        item.onmouseout = function () {
            this.style.color='black';
        }
    });


    // var flag =true;
    // btn1.onclick =function(){
    //     if(flag){
    //         main_b.style.height='350px';

    //         flag=0;
    //     }else{
    //         main_b.style.height=' ';
    //         flag=1;
    //     }
    // }

    let shouqBu = true;
btn1.onclick = function() {
    let shouqiBox = document.querySelector("#main_b")
    console.log(shouqiBox);
    if (shouqBu) {
        shouqiBox.style.height = "0px";
        shouqiBox.style.border = "1px solid #e8e8e8";
        shouqBu = false
    } else {
        shouqiBox.style.height = "268px";
        shouqiBox.style.border = "1px solid #e8e8e8";
        shouqBu = true
    };
};

    xiao.onclick = function(){
        let newstr1=arr11.concat([]);
        newstr1.sort((a,b)=>{
               return b.p3 - a.p3;
               fn(win1) 
        })
      
        main_img.innerHTML= newstr1.map(item=>
           `
           <dl id="dl">
               <dt id="dt"><img src=${item.img}></dt>
               <dd>
                   <p class="p1"><span>￥</span>${item.p1}</p>
                   <p class="p2">${item.p2}</p>
                   <p class="p3">${item.p3}<span>+人付款</span></p>
                   <p class="p4">${item.p4}</p>
                   <p class="p5">${item.p5}</p>
                   <p class="p6">${item.p6}</p>
               </dd>
           </dl>
           `
           ).join("")
       }

       jia.onclick = function(){
        let newstr2=arr11.concat([]);
        newstr2.sort((a,b)=>{
               return a.p1 - b.p1;
        })
        main_img.innerHTML= newstr2.map(item=>
          `
           <dl id="dl">
               <dt id="dt"><img src=${item.img}></dt>
               <dd>
                   <p class="p1"><span>￥</span>${item.p1}</p>
                   <p class="p2">${item.p2}</p>
                   <p class="p3">${item.p3}<span>+人付款</span></p>
                   <p class="p4">${item.p4}</p>
                   <p class="p5">${item.p5}</p>
                   <p class="p6">${item.p6}</p>
               </dd>
           </dl>
           `
           ).join("")
       }

       zong.onclick = function(){
        main_img.innerHTML= arr11.map(item=>
             `
            <dl id="dl">
                <dt id="dt"><img src=${item.img}></dt>
                <dd>
                    <p class="p1"><span>￥</span>${item.p1}</p>
                    <p class="p2">${item.p2}</p>
                    <p class="p3">${item.p3}<span>+人付款</span></p>
                    <p class="p4">${item.p4}</p>
                    <p class="p5">${item.p5}</p>
                    <p class="p6">${item.p6}</p>
                </dd>
            </dl>
            `
            ).join("")
       }

    ti.onclick=function(){
        let pp1 = arr11.concat([]);
        let pp3=[];
        if(min.value!='' && Number(min.value) < Number(max.value)){
            pp1.forEach(item=>{
                if(Number(item.p1)>Number(min.value)&& Number(item.p1)<Number(max.value)){
                       pp3.push(item);
                       main_img.innerHTML= pp3.map(item=>
                        `
                         <dl id="dl">
                             <dt id="dt"><img src=${item.img}></dt>
                             <dd>
                                 <p class="p1"><span>￥</span>${item.p1}</p>
                                 <p class="p2">${item.p2}</p>
                                 <p class="p3">${item.p3}<span>+人付款</span></p>
                                 <p class="p4">${item.p4}</p>
                                 <p class="p5">${item.p5}</p>
                                 <p class="p6">${item.p6}</p>
                             </dd>
                         </dl>
                         `
                         ).join("")
            }
        })
    }
       
       

        
 }  
        
       

     
        
     
    
